<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>-.-</title>
    <link rel="stylesheet" href="{CSS}adminmer/reset.css">
    <link rel="stylesheet" href="{CSS}adminmer/bootstrap-admin.css">
    <link rel="stylesheet" href="{CSS}adminmer/backstage.css">
    <link rel=stylesheet   href="{CSS}public/page.css">
    <script src="{JS}home/jquery-1.8.3.js"></script>
    <script>pageurl="?m=adminmer&c=Orderc&a=order_list";</script>
    <script src="{JS}public/page.js"></script>
</head>

<body>
<span class="main-title">订单列表</span>
<div class="details">
    <div class="details_operation clearfix">

        <div class="fl">
        </div>

        <div class="fr">
            <div class="text">

                <span>
                                <input type="text" value="" placeholder="搜索如:下单人/手机/订单号" class="search form-control" name="search">
                                </span>
                <span>
                    <input type="button" value="搜索" id="search" class="btn btn-primary">
                </span>
            </div>
        </div>
    </div>
    <div id="show">
    <!--表格-->
    <table class="table  table-hover">
        <thead>
        <tr>
            <th width="10%">订单编号</th>
            <th width="20%">名称</th>
            <th width="5%">价格</th>
            <th width="5%">是否支付</th>
            <th width="5%">支付方式</th>
            <th width="5%">订单状态</th>
            <th width="10%">订单时间</th>
            <th width="10%">下单人/手机</th>
            <th width="10%">操作</th>
        </tr>
        </thead>
        <tbody>
        {if $rows neq 0}
       {foreach $rows as $val}
        <tr align="center">
            <!--这里的id和for里面的c1 需要循环出来-->
            <td>{$val.orderId}</td>
            <td>
                {foreach $val['items'] as $v}
                {$v.name}<br>
                {/foreach}
            </td>
            <td>{$val.price}元</td>
            <td>
                {if $val.pay eq 1}
                是
                {else}
                否
                {/if}
            </td>
            <td>
                {if $val.paymethod eq 0}
                   微信
                 {elseif $val.paymethod eq 1}
                   支付宝
                 {elseif $val.paymethod eq 2}
                   货到付款
                 {elseif $val.paymethod eq 3}
                   余额
                {/if}
            </td>
            <td>
                {if $val.received eq 1 || $val.received eq 3}
                已接
                 {else}
                未接
                {/if}
            </td>
            <td>
                {date("Y-m-d H:i:s",$val['orderTime'])}
            </td>
            <td>
                {$val.orderName}/{$val.orderPhone}
            </td>
            <td align="center">
                <a class="btn btn-link"  onclick="printOrder({$val.id})">打印</a>
            </td>
        </tr>
      {/foreach}
        </tbody>
    </table>
        <p align="center">
            {$page}
        </p>
        <p align="center">
            共{$count}条数据
        </p>
        <p align="center">
            当前页面支付成功总余额为<b><font color="red">{$price}</font></b>元
        </p>
        {/if}
    </div>
</div>
<script type="text/javascript">

</script>
</body>
</html>